---
title: "Topline Tables by Q8"
output: pdf_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE)
require(knitr)
library(survey)
library(foreign)
library(car)
library(xtable)
mil_conf.df <- read.csv("~/Dropbox/Public_Conf_Mil/Data_and_code/mil_conf.csv")
```

```{r echo = FALSE}
source("~/Dropbox/Public_Conf_Mil/Data_and_code/PCM_cleaning.R")

milconf_design <-
  svydesign(
    id = ~ 1,
    weights = ~ weight,
    data = mil_conf.df
  )
```

**Q1A**: Which of the following is NOT a military service?

```{r echo = FALSE}
Q1A <- matrix(svymean(~ Q1A_fac, milconf_design, na.rm = TRUE)[1:6] * 100)
rownames(Q1A) <- c("Army", "Air Force", "Merchant Marines", "Marine Corps", "Navy", "Skipped")
colnames(Q1A) <- c("%")
Q1A_tab <- xtable(Q1A)
digits(Q1A_tab) <- 1
align(Q1A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print.xtable(Q1A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q1B**: Which military service has the most personnel?

```{r echo = FALSE}
Q1B <- matrix(svymean(~ Q1B_fac, milconf_design, na.rm = TRUE)[1:6] * 100)
rownames(Q1B) <- c("Marine Corps", "Space Force", "Border Security Patrol", "Army", "Merchant Marines", "Skipped")
colnames(Q1B) <- c("%")
Q1B_tab <- xtable(Q1B)
digits(Q1B_tab) <- 1
align(Q1B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q1B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q2A**: Which of the following ranks from highest to lowest in the number of American combat fatalities: Vietnam (1962-1975), Gulf War (1991), Afghanistan (2001-2019), Iraq (2003-2019).

```{r echo = FALSE}
Q2A <- matrix(svymean(~ Q2A_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q2A) <- c("Afghanistan, Vietnam, Gulf War, Iraq", "Gulf War, Vietnam, Afghanistan, Iraq", "Vietnam, Iraq, Afghanistan, Gulf War", "Vietnam, Afghanistan, Iraq, Gulf War", "Vietnam, Gulf War, Afghanistan, Iraq", "Skipped")
colnames(Q2A) <- c("%")
Q2A_tab <- xtable(Q2A)
digits(Q2A_tab) <- 1
align(Q2A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q2A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q2B**: In which of the following countries has a U.S. service member died since the beginning of 2017?

```{r echo = FALSE}
Q2B <- matrix(NA, ncol = 2, nrow = 5)
rownames(Q2B) <- c("Afghanistan", "Niger", "Yemen", "Somalia", "Iraq")
colnames(Q2B) <- c("No", "Yes")
Q2B[1,] <- svymean(~Q2B_1_fac, milconf_design, na.rm = TRUE) * 100
Q2B[2,] <- svymean(~Q2B_2_fac, milconf_design, na.rm = TRUE) * 100
Q2B[3,] <- svymean(~Q2B_3_fac, milconf_design, na.rm = TRUE) * 100
Q2B[4,] <- svymean(~Q2B_4_fac, milconf_design, na.rm = TRUE) * 100
Q2B[5,] <- svymean(~Q2B_5_fac, milconf_design, na.rm = TRUE) * 100
Q2B_tab <- xtable(Q2B)
digits(Q2B_tab) <- 1
align(Q2B_tab) <- "rcc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q2B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q3**: Who is the Commander in Chief of the armed forces?

```{r echo = FALSE}
Q3 <- matrix(svymean(~ Q3_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q3) <- c("Chairman of the Joint Chiefs of Staff", "Army Chief of Staff", "President", "Secretary of Defense","Supreme Allied Commander", "Skipped")
colnames(Q3) <- c("%")
Q3_tab <- xtable(Q3)
digits(Q3_tab) <- 1
align(Q3_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q3_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**Q4**: Are women currently allowed to serve in combat arms units in the U.S. military?

```{r echo = FALSE}
Q4 <- matrix(svymean(~ Q4_fac, milconf_design, na.rm = TRUE)[1:4] * 100)
rownames(Q4) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q4) <- c("%")
Q4_tab <- xtable(Q4)
digits(Q4_tab) <- 1
align(Q4_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q4_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q5**: What does the acronym MRE stand for?

```{r echo = FALSE}
Q5 <- matrix(svymean(~ Q5_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q5) <- c("Mission Rehearsal Episode", "Meal, Ready-to-Eat", "Main Reconnaissance Effort", "Mandatory Readiness Exercise", "Mars Rover Effort", "Skipped")
colnames(Q5) <- c("%")
Q5_tab <- xtable(Q5)
digits(Q5_tab) <- 1
align(Q5_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q5_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q6**: What was the last declaration of war by the United States?

```{r echo = FALSE}
Q6 <- matrix(svymean(~ Q6_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q6) <- c("after the September 11, 2001 terrorist attacks", "after the Soviet Union launched the Sputnik satellite in 1957", "after the attack on Pearl Harbor in December 1941", "during the Cuban Missile Crisis in October 1962", "when ISIS captured Mosul in June 2014", "Skipped")
colnames(Q6) <- c("%")
Q6_tab <- xtable(Q6)
digits(Q6_tab) <- 1
align(Q6_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q6_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q7**: Are the following military leaders still serving on active duty or have they retired?

```{r echo = FALSE}
Q7 <- matrix(NA, ncol = 5, nrow = 9)
rownames(Q7) <- c("Jim Mattis", "H.R. McMaster", "David Petraeus", "Colin Powell", "David Goldfein", "James Stavridis", "Joseph Dunford", "Mark Milley", "William McRaven")
colnames(Q7) <- c("Active Duty", "Retired", "Not Sure", "Never Heard Of", "Skipped")
Q7[1,] <- svymean(~Q7A_fac, milconf_design, na.rm = TRUE) * 100
Q7[2,] <- svymean(~Q7B_fac, milconf_design, na.rm = TRUE) * 100
Q7[3,] <- svymean(~Q7C_fac, milconf_design, na.rm = TRUE) * 100
Q7[4,] <- svymean(~Q7D_fac, milconf_design, na.rm = TRUE) * 100
Q7[5,] <- svymean(~Q7E_fac, milconf_design, na.rm = TRUE) * 100
Q7[6,] <- svymean(~Q7F_fac, milconf_design, na.rm = TRUE) * 100
Q7[7,] <- svymean(~Q7G_fac, milconf_design, na.rm = TRUE) * 100
Q7[8,] <- svymean(~Q7H_fac, milconf_design, na.rm = TRUE) * 100
Q7[9,] <- svymean(~Q7I_fac, milconf_design, na.rm = TRUE) * 100
Q7_tab <- xtable(Q7)
digits(Q7_tab) <- 1
align(Q7_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q7_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q8**: Please tell me how much confidence you, yourself, have in the military - a great deal, quite a lot, some, or very little?

```{r echo = FALSE}
Q8 <- svyby(~Q8_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:6] * 100
colnames(Q8) <- c("A great deal", "Quite a lot", "Some", "Very little", "Skipped")
rownames(Q8) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q8_tab <- xtable(Q8)
digits(Q8_tab) <- 1
align(Q8_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q8_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q9**: Now we would like you to think about the same question, but in another way. On a scale of 0-10 (with 0 being the least and 10 being the most), how much confidence do you have in the military?

```{r echo = FALSE}
Q9 <- svyby(~Q9_m_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:12] * 100
colnames(Q9) <- c("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
rownames(Q9) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q9_tab <- xtable(Q9)
digits(Q9_tab) <- 1
align(Q9_tab) <- "rccccccccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q9_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q10**: Next, please tell us how much confidence you, yourself, have in the generals and admirals leading the United States military.

```{r echo = FALSE}
Q10 <- svyby(~Q10_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:6] * 100
colnames(Q10) <- c("A great deal", "Quite a lot", "Some", "Very little", "Skipped")
rownames(Q10) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q10_tab <- xtable(Q10)
digits(Q10_tab) <- 1
align(Q10_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q10_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q10A**: On a scale of 0-10 (with 0 being the least and 10 being the most), how much confidence do you have in the generals and admirals leading the United States military?

```{r echo = FALSE}
Q10A <- svyby(~Q10A_m_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:12] * 100
colnames(Q10A) <- c("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
rownames(Q10A) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q10A_tab <- xtable(Q10A)
digits(Q10A_tab) <- 1
align(Q10A_tab) <- "rccccccccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q10A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q11**: Please tell us how much confidence you, yourself, have in the generals and admirals who have retired from the United States military - a great deal, quite a lot, some, or very little?

```{r echo = FALSE}
Q11 <- svyby(~Q11_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:6] * 100
colnames(Q11) <- c("A great deal", "Quite a lot", "Some", "Very little", "Skipped")
rownames(Q11) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q11_tab <- xtable(Q11)
digits(Q11_tab) <- 1
align(Q11_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q11_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**Q11A**: On a scale of 0-10 (with 0 being the least and 10 being the most), how much confidence do you have in the generals and admirals who have retired from the United States military?

```{r echo = FALSE}
Q11A <- svyby(~Q11A_m_fac, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1:8, 2:12] * 100
colnames(Q11A) <- c("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
rownames(Q11A) <- c("Control", "Republican Military", "Democrat Military", "Polarized Military",
                  "Lost Afghanistan War", "Won Afghanistan War", "Ethical Generals", "Unethical Generals")
Q11A_tab <- xtable(Q11A)
digits(Q11A_tab) <- 1
align(Q11A_tab) <- "rccccccccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q11A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12A**: Please indicate to what extent you agree/disagree with these statements: The military has become too partisan.

```{r echo = FALSE}
Q12A <- matrix(svymean(~Q12A_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12A) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12A) <- c("%")
Q12A_tab <- xtable(Q12A)
digits(Q12A_tab) <- 1
align(Q12A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12B**: Please indicate to what extent you agree/disagree with these statements: The military is good at what it does.

```{r echo = FALSE}
Q12B <- matrix(svymean(~Q12B_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12B) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12B) <- c("%")
Q12B_tab <- xtable(Q12B)
digits(Q12B_tab) <- 1
align(Q12B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12C**: Please indicate to what extent you agree/disagree with these statements: The military usually wins the wars it fights.

```{r echo = FALSE}
Q12C <- matrix(svymean(~Q12C_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12C) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12C) <- c("%")
Q12C_tab <- xtable(Q12C)
digits(Q12C_tab) <- 1
align(Q12C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12D**: Please indicate to what extent you agree/disagree with these statements: The military is representative of the demographic diversity of American society.

```{r echo = FALSE}
Q12D <- matrix(svymean(~Q12D_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12D) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12D) <- c("%")
Q12D_tab <- xtable(Q12D)
digits(Q12D_tab) <- 1
align(Q12D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12E**: Please indicate to what extent you agree/disagree with these statements: The military maintains the highest standards of professional ethics.

```{r echo = FALSE}
Q12E <- matrix(svymean(~Q12E_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12E) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12E) <- c("%")
Q12E_tab <- xtable(Q12E)
digits(Q12E_tab) <- 1
align(Q12E_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12F**: Please indicate to what extent you agree/disagree with these statements: The military makes truthful claims.

```{r echo = FALSE}
Q12F <- matrix(svymean(~Q12F_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12F) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12F) <- c("%")
Q12F_tab <- xtable(Q12F)
digits(Q12F_tab) <- 1
align(Q12F_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12G**: Please indicate to what extent you agree/disagree with these statements: The military shares my values.

```{r echo = FALSE}
Q12G <- matrix(svymean(~Q12G_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12G) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12G) <- c("%")
Q12G_tab <- xtable(Q12G)
digits(Q12G_tab) <- 1
align(Q12G_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12H**: Please indicate to what extent you agree/disagree with these statements: Most members of American society have confidence in the military.

```{r echo = FALSE}
Q12H <- matrix(svymean(~Q12H_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12H) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12H) <- c("%")
Q12H_tab <- xtable(Q12H)
digits(Q12H_tab) <- 1
align(Q12H_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12H_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q12I**: Please indicate to what extent you agree/disagree with these statements: Members of the military should not get preferential treatment in airports and restaurants.

```{r echo = FALSE}
Q12I <- matrix(svymean(~Q12I_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12I) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12I) <- c("%")
Q12I_tab <- xtable(Q12I)
digits(Q12I_tab) <- 1
align(Q12I_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12I_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**Q12J**: Please indicate to what extent you agree/disagree with these statements: Military veterans should not get preferential treatment when they look for jobs in the civilian world.

```{r echo = FALSE}
Q12J <- matrix(svymean(~Q12J_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q12J) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q12J) <- c("%")
Q12J_tab <- xtable(Q12J)
digits(Q12J_tab) <- 1
align(Q12J_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q12J_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q13**: Please tell me how much confidnece you, yourself have in [institution] - a great deal, quite a lot, some, or very little?

```{r echo = FALSE}
Q13 <- svyby(~Q13_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:6] * 100
rownames(Q13) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q13) <- c("A great deal", "Quite a lot", "Some", "Very little", "Skipped")
Q13_tab <- xtable(Q13)
digits(Q13_tab) <- 1
align(Q13_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q13_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q14**: On a scale of 0-10, how much confidence do you have in [institution]?

```{r echo = FALSE}
Q14 <- matrix(NA, ncol = 4, nrow = 12)
Q14[1,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,2] * 100
Q14[2,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q14[3,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q14[4,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q14[5,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q14[6,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,7] * 100
Q14[7,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,8] * 100
Q14[8,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,9] * 100
Q14[9,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,10] * 100
Q14[10,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,11] * 100
Q14[11,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,12] * 100
Q14[12,] <- svyby(~Q14_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[,13] * 100
colnames(Q14) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
rownames(Q14) <- c("0 - Not at all confident", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10 - Very Confident", "Skipped")
Q14_tab <- xtable(Q14)
digits(Q14_tab) <- 1
align(Q14_tab) <- "rcccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q14_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15A**: Please indicate to what extent you agree/disagree with these statements: [Institution] has become too partisan.

```{r echo = FALSE}
Q15A <- svyby(~Q15A_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15A) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15A) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15A_tab <- xtable(Q15A)
digits(Q15A_tab) <- 1
align(Q15A_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15B**: Please indicate to what extent you agree/disagree with these statements: [Institution] is good at what it does.

```{r echo = FALSE}
Q15B <- svyby(~Q15B_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15B) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15B) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15B_tab <- xtable(Q15B)
digits(Q15B_tab) <- 1
align(Q15B_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15C**: Please indicate to what extent you agree/disagree with these statements: [Institution] is representative of the demographic diversity of American society.

```{r echo = FALSE}
Q15C <- svyby(~Q15C_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15C) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15C) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15C_tab <- xtable(Q15C)
digits(Q15C_tab) <- 1
align(Q15C_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15D**: Please indicate to what extent you agree/disagree with these statements: [Institution] maintains the highest standards of professional ethics.

```{r echo = FALSE}
Q15D <- svyby(~Q15D_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15D) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15D) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15D_tab <- xtable(Q15D)
digits(Q15D_tab) <- 1
align(Q15D_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15E**: Please indicate to what extent you agree/disagree with these statements: [Institution] makes truthful claims.

```{r echo = FALSE}
Q15E <- svyby(~Q15E_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15E) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15E) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15E_tab <- xtable(Q15E)
digits(Q15E_tab) <- 1
align(Q15E_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15F**: Please indicate to what extent you agree/disagree with these statements: [Institution] shares my values.

```{r echo = FALSE}
Q15F <- svyby(~Q15F_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15F) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15F) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15F_tab <- xtable(Q15F)
digits(Q15F_tab) <- 1
align(Q15F_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q15G**: Please indicate to what extent you agree/disagree with these statements: Most members of American society have confidence in [institution].

```{r echo = FALSE}
Q15G <- svyby(~Q15G_fac, ~DOV_INSTITUTION, milconf_design, svymean, na.rm = TRUE)[1:4,2:7] * 100
rownames(Q15G) <- c("Supreme Court", "Congress", "the media", "US foreign policy elite")
colnames(Q15G) <- c("Strongly agree", "Agree", "Neither", "Disagree", "Strongly Disagree", "Skipped")
Q15G_tab <- xtable(Q15G)
digits(Q15G_tab) <- 1
align(Q15G_tab) <- "rcccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q15G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q16**: How would you describe most members of the military?

```{r echo = FALSE}
Q16 <- matrix(svymean(~Q16_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q16) <- c("Most affiliate with a political party", "Most do not affiliate with a political party or are independent", "Skipped")
colnames(Q16) <- c("%")
Q16_tab <- xtable(Q16)
digits(Q16_tab) <- 1
align(Q16_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q16_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**Q16A**: [If Q16 = 1] To which party do most members of the military belong?

```{r echo = FALSE}
Q16A <- matrix(svymean(~Q16A_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q16A) <- c("Most are Democrats", "Most are Republicans", "There are about equal numbers of Republicans and Democrats", "Skipped")
colnames(Q16A) <- c("%")
Q16A_tab <- xtable(Q16A)
digits(Q16A_tab) <- 1
align(Q16A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q16A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q16B**: [If Q16 =2] In general, to which party do most members of the military who affiliate with a political party belong?

```{r echo = FALSE}
Q16B <- matrix(svymean(~Q16B_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q16B) <- c("Democratic", "Republican", "There are about equal numbers of Republicans and Democrats", "Skipped")
colnames(Q16B) <- c("%")
Q16B_tab <- xtable(Q16B)
digits(Q16B_tab) <- 1
align(Q16B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q16B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q17**: How would you describe the political ideology of most members of the military?

```{r echo = FALSE}
Q17 <- matrix(svymean(~Q17_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q17) <- c("Extremely Liberal", "Liberal", "Slightly Liberal", "Moderate", "Slightly Conservative", "Conservative", "Extremely Conservative", "Don't Know", "Skipped")
colnames(Q17) <- c("%")
Q17_tab <- xtable(Q17)
digits(Q17_tab) <- 1
align(Q17_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q17_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q18**: As you consider the people serving in the military, do you think they mostly look like you, or do they mostly come from very different demographic backgrounds than you?

```{r echo = FALSE}
Q18 <- matrix(svymean(~Q18_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q18) <- c("Most look like me", "Some look like me", "A few look like me", "Most don't look like me", "Don't Know", "Skipped")
colnames(Q18) <- c("%")
Q18_tab <- xtable(Q18)
digits(Q18_tab) <- 1
align(Q18_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q18_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19A**: Please indicate the extent to which you agree/disagree with the following statements: Members of the military should be allowed to publicly express their political views just like any other citizen.

```{r echo = FALSE}
Q19A <- matrix(svymean(~Q19A_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19A) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19A) <- c("%")
Q19A_tab <- xtable(Q19A)
digits(Q19A_tab) <- 1
align(Q19A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**1 - Q19B**: Please indicate the extent to which you agree/disagree with the following statements: It is proper for retired generals and admirals to publicly criticize the President of the United States for his performance as Commander-in-Chief.

```{r echo = FALSE}
Q19B <- matrix(svymean(~Q19B_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19B) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19B) <- c("%")
Q19B_tab <- xtable(Q19B)
digits(Q19B_tab) <- 1
align(Q19B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19C**: Please indicate the extent to which you agree/disagree with the following statements: It was proper when retired generals and admirals criticized President Obama for his performance as Commander-in-Chief.

```{r echo = FALSE}
Q19C <- matrix(svymean(~Q19C_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19C) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19C) <- c("%")
Q19C_tab <- xtable(Q19C)
digits(Q19C_tab) <- 1
align(Q19C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19D**: Please indicate the extent to which you agree/disagree with the following statements: In general, high-ranking civilian officials rather than high-ranking military officers should have the final say in whether or not to use military force.

```{r echo = FALSE}
Q19D <- matrix(svymean(~Q19D_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19D) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19D) <- c("%")
Q19D_tab <- xtable(Q19D)
digits(Q19D_tab) <- 1
align(Q19D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19E**: Please indicate the extent to which you agree/disagree with the following statements: A system in which the military rules would be a good way of ruling this country.

```{r echo = FALSE}
Q19E <- matrix(svymean(~Q19E_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19E) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19E) <- c("%")
Q19E_tab <- xtable(Q19E)
digits(Q19E_tab) <- 1
align(Q19E_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19F**: Please indicate the extent to which you agree/disagree with the following statements: Senior military leaders, like generals and admirals, have told the American people the truth about the war in Afghanistan.

```{r echo = FALSE}
Q19F <- matrix(svymean(~Q19F_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19F) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19F) <- c("%")
Q19F_tab <- xtable(Q19F)
digits(Q19F_tab) <- 1
align(Q19F_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19G**: Please indicate the extent to which you agree/disagree with the following statements: To be respected as Commander-in-Chief, the President should have served in uniform.

```{r echo = FALSE}
Q19G <- matrix(svymean(~Q19G_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19G) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19G) <- c("%")
Q19G_tab <- xtable(Q19G)
digits(Q19G_tab) <- 1
align(Q19G_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q19H**: Please indicate the extent to which you agree/disagree with the following statements: There tend to be more problems when you use non-military tools like sanctions and diplomacy than when you use military force to address foreign policy issues.

```{r echo = FALSE}
Q19H <- matrix(svymean(~Q19H_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19H) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19H) <- c("%")
Q19H_tab <- xtable(Q19H)
digits(Q19H_tab) <- 1
align(Q19H_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19H_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19A**: Please indicate the extent to which you agree/disagree with the following statements: Members of the military should not publicly criticize senior members of civilian branches of the government.

```{r echo = FALSE}
Q19AA <- matrix(svymean(~Q19AA_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AA) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AA) <- c("%")
Q19AA_tab <- xtable(Q19AA)
digits(Q19AA_tab) <- 1
align(Q19AA_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AA_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19B**: Please indicate the extent to which you agree/disagree with the following statements: It is proper for the military to advocate publicly the military policies it believes are in the best interests of the United States.

```{r echo = FALSE}
Q19AB <- matrix(svymean(~Q19AB_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AB) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AB) <- c("%")
Q19AB_tab <- xtable(Q19AB)
digits(Q19AB_tab) <- 1
align(Q19AB_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AB_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19C**: Please indicate the extent to which you agree/disagree with the following statements: It is proper for retired generals and admirals to publicly criticize President Trump for his performance as Commander-in-Chief.

```{r echo = FALSE}
Q19AC <- matrix(svymean(~Q19AC_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AC) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AC) <- c("%")
Q19AC_tab <- xtable(Q19AC)
digits(Q19AC_tab) <- 1
align(Q19AC_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AC_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**2 - Q19D**: Please indicate the extent to which you agree/disagree with the following statements: In wartime, civilian government leaders should let the military take over the running of the war.

```{r echo = FALSE}
Q19AD <- matrix(svymean(~Q19AD_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AD) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AD) <- c("%")
Q19AD_tab <- xtable(Q19AD)
digits(Q19AD_tab) <- 1
align(Q19AD_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AD_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19E**: Please indicate the extent to which you agree/disagree with the following statements: Military leaders do not have enough influence in deciding our policies with other countries.

```{r echo = FALSE}
Q19AE <- matrix(svymean(~Q19AE_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AE) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AE) <- c("%")
Q19AE_tab <- xtable(Q19AE)
digits(Q19AE_tab) <- 1
align(Q19AE_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AE_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19F**: Please indicate the extent to which you agree/disagree with the following statements: The statements of retired generals and admirals reflect the views of the men and women currently serving on active duty in the U.S. military.

```{r echo = FALSE}
Q19AF <- matrix(svymean(~Q19AF_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AF) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AF) <- c("%")
Q19AF_tab <- xtable(Q19AF)
digits(Q19AF_tab) <- 1
align(Q19AF_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AF_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19G**: Please indicate the extent to which you agree/disagree with the following statements: Military leaders care more about the people under their command than leaders in the non-military world care about people under them.

```{r echo = FALSE}
Q19AG <- matrix(svymean(~Q19AG_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AG) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AG) <- c("%")
Q19AG_tab <- xtable(Q19AG)
digits(Q19AG_tab) <- 1
align(Q19AG_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AG_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q19H**: Please indicate the extent to which you agree/disagree with the following statements: There tend to be more problems when you use military force than when you use diplomatic tools like sanctions and diplomacy to address foreign policy issues.

```{r echo = FALSE}
Q19AH <- matrix(svymean(~Q19AH_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q19AH) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q19AH) <- c("%")
Q19AH_tab <- xtable(Q19AH)
digits(Q19AH_tab) <- 1
align(Q19AH_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q19AH_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27A**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are educated.

```{r echo = FALSE}
Q27A <- matrix(svymean(~Q27A_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27A) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27A) <- c("%")
Q27A_tab <- xtable(Q27A)
digits(Q27A_tab) <- 1
align(Q27A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27B**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are selfless.

```{r echo = FALSE}
Q27B <- matrix(svymean(~Q27B_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27B) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27B) <- c("%")
Q27B_tab <- xtable(Q27B)
digits(Q27B_tab) <- 1
align(Q27B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27C**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are homophobic.

```{r echo = FALSE}
Q27C <- matrix(svymean(~Q27C_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27C) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27C) <- c("%")
Q27C_tab <- xtable(Q27C)
digits(Q27C_tab) <- 1
align(Q27C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27D**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are racist.

```{r echo = FALSE}
Q27D <- matrix(svymean(~Q27D_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27D) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27D) <- c("%")
Q27D_tab <- xtable(Q27D)
digits(Q27D_tab) <- 1
align(Q27D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27E**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are heroes.

```{r echo = FALSE}
Q27E <- matrix(svymean(~Q27E_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27E) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27E) <- c("%")
Q27E_tab <- xtable(Q27E)
digits(Q27E_tab) <- 1
align(Q27E_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27F**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military have PTSD.

```{r echo = FALSE}
Q27F <- matrix(svymean(~Q27F_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27F) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27F) <- c("%")
Q27F_tab <- xtable(Q27F)
digits(Q27F_tab) <- 1
align(Q27F_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27G**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are truthful.

```{r echo = FALSE}
Q27G <- matrix(svymean(~Q27G_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27G) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27G) <- c("%")
Q27G_tab <- xtable(Q27G)
digits(Q27G_tab) <- 1
align(Q27G_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27H**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are dangerous.

```{r echo = FALSE}
Q27H <- matrix(svymean(~Q27H_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27H) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27H) <- c("%")
Q27H_tab <- xtable(Q27H)
digits(Q27H_tab) <- 1
align(Q27H_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27H_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27I**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are sexist.

```{r echo = FALSE}
Q27I <- matrix(svymean(~Q27I_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27I) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27I) <- c("%")
Q27I_tab <- xtable(Q27I)
digits(Q27I_tab) <- 1
align(Q27I_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27I_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q27J**: Next, we will provide some statements that may or may not describe the people serving in the military. Please indicate to what extent you agree/disagree with these statements: Most members of the military are intelligent.

```{r echo = FALSE}
Q27J <- matrix(svymean(~Q27J_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q27J) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q27J) <- c("%")
Q27J_tab <- xtable(Q27J)
digits(Q27J_tab) <- 1
align(Q27J_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q27J_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q28A**: Now we want to ask you your opinion about a number of policy questions that relate to the military: If the President authorized the removal of all U.S. troops from Iraq, would you support that decision?

```{r echo = FALSE}
Q28A <- matrix(svymean(~Q28A_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28A) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28A) <- c("%")
Q28A_tab <- xtable(Q28A)
digits(Q28A_tab) <- 1
align(Q28A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q28B**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think the United States made a mistake sending troops to Afghanistan in 2001?

```{r echo = FALSE}
Q28B <- matrix(svymean(~Q28B_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28B) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28B) <- c("%")
Q28B_tab <- xtable(Q28B)
digits(Q28B_tab) <- 1
align(Q28B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q28C**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think women should be allowed to serve in all combat jobs in the U.S. military?

```{r echo = FALSE}
Q28C <- matrix(svymean(~Q28C_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28C) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28C) <- c("%")
Q28C_tab <- xtable(Q28C)
digits(Q28C_tab) <- 1
align(Q28C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q28D**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think the United States government should be allowed to use drones to carry out attacks in other countries on people deemed a threat to the U.S.?

```{r echo = FALSE}
Q28D <- matrix(svymean(~Q28D_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28D) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28D) <- c("%")
Q28D_tab <- xtable(Q28D)
digits(Q28D_tab) <- 1
align(Q28D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q28A**: Now we want to ask you your opinion about a number of policy questions that relate to the military: If the President authorized the removal of all U.S. troops from Afghanistan, would you support that decision?

```{r echo = FALSE}
Q28AA <- matrix(svymean(~Q28AA_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28AA) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28AA) <- c("%")
Q28AA_tab <- xtable(Q28AA)
digits(Q28AA_tab) <- 1
align(Q28AA_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28AA_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**2 - Q28B**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think the United States made a mistake sending troops to Iraq in 2003?

```{r echo = FALSE}
Q28AB <- matrix(svymean(~Q28AB_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28AB) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28AB) <- c("%")
Q28AB_tab <- xtable(Q28AB)
digits(Q28AB_tab) <- 1
align(Q28AB_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28AB_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q28C**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think transgender persons should be allowed to serve in the U.S. military?

```{r echo = FALSE}
Q28AC <- matrix(svymean(~Q28AC_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28AC) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28AC) <- c("%")
Q28AC_tab <- xtable(Q28AC)
digits(Q28AC_tab) <- 1
align(Q28AC_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28AC_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q28D**: Now we want to ask you your opinion about a number of policy questions that relate to the military: Do you think the United States government should be allowed to use special operations forces to carry out attacks in other countries on people deemed a threat to the U.S.?

```{r echo = FALSE}
Q28AD <- matrix(svymean(~Q28AD_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q28AD) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q28AD) <- c("%")
Q28AD_tab <- xtable(Q28AD)
digits(Q28AD_tab) <- 1
align(Q28AD_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q28AD_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q31**: Who deserves the most credit for the outcome of the wars in Iraq and Afghanistan?

```{r echo = FALSE}
Q31 <- matrix(svymean(~Q31_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q31) <- c("Civilian political leaders", "Senior military leaders", "Enemies on the battlefield", "Don't Know", "Skipped")
colnames(Q31) <- c("%")
Q31_tab <- xtable(Q31)
digits(Q31_tab) <- 1
align(Q31_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q31_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q31**: Who deserves the most blame for the outcome of the wars in Iraq and Afghanistan?

```{r echo = FALSE}
Q31A <- matrix(svymean(~Q31A_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q31A) <- c("Civilian political leaders", "Senior military leaders", "Enemies on the battlefield", "Don't Know", "Skipped")
colnames(Q31A) <- c("%")
Q31A_tab <- xtable(Q31A)
digits(Q31A_tab) <- 1
align(Q31A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q31A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33A**: Please indicate the extent to which you agree/disagree with the following statements: Overall, our political leaders share the same values as the American people.

```{r echo = FALSE}
Q33A <- matrix(svymean(~Q33A_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33A) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33A) <- c("%")
Q33A_tab <- xtable(Q33A)
digits(Q33A_tab) <- 1
align(Q33A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33B**: Please indicate the extent to which you agree/disagree with the following statements: Overall, our political leaders are demographically representative of the American people.

```{r echo = FALSE}
Q33B <- matrix(svymean(~Q33B_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33B) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33B) <- c("%")
Q33B_tab <- xtable(Q33B)
digits(Q33B_tab) <- 1
align(Q33B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33C**: Please indicate the extent to which you agree/disagree with the following statements: I would be disappointed if a member of my family or a close friend joined the U.S. military.

```{r echo = FALSE}
Q33C <- matrix(svymean(~Q33C_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33C) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33C) <- c("%")
Q33C_tab <- xtable(Q33C)
digits(Q33C_tab) <- 1
align(Q33C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33D**: Please indicate the extent to which you agree/disagree with the following statements: In general, I respect people who have served in the military more than I respect those who haven't served.

```{r echo = FALSE}
Q33D <- matrix(svymean(~Q33D_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33D) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33D) <- c("%")
Q33D_tab <- xtable(Q33D)
digits(Q33D_tab) <- 1
align(Q33D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33E**: Please indicate the extent to which you agree/disagree with the following statements: Through leading by example, the U.S. military could help American society become more moral.

```{r echo = FALSE}
Q33E <- matrix(svymean(~Q33E_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33E) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33E) <- c("%")
Q33E_tab <- xtable(Q33E)
digits(Q33E_tab) <- 1
align(Q33E_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33F**: Please indicate the extent to which you agree/disagree with the following statements: The military needs to become more like American society.

```{r echo = FALSE}
Q33F <- matrix(svymean(~Q33F_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33F) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33F) <- c("%")
Q33F_tab <- xtable(Q33F)
digits(Q33F_tab) <- 1
align(Q33F_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**1 - Q33G**: Please indicate the extent to which you agree/disagree with the following statements: The U.S. government would function better if we allowed the military to take over non-military programs, such as tax collection or public education.

```{r echo = FALSE}
Q33G <- matrix(svymean(~Q33G_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33G) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33G) <- c("%")
Q33G_tab <- xtable(Q33G)
digits(Q33G_tab) <- 1
align(Q33G_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**1 - Q33H**: Please indicate the extent to which you agree/disagree with the following statements: All Americans should stand for the national anthem.

```{r echo = FALSE}
Q33H <- matrix(svymean(~Q33H_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33H) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33H) <- c("%")
Q33H_tab <- xtable(Q33H)
digits(Q33H_tab) <- 1
align(Q33H_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33H_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33A**: Please indicate the extent to which you agree/disagree with the following statements: In general, senior military leaders, like generals and admirals, share the same values as the American people.

```{r echo = FALSE}
Q33AA <- matrix(svymean(~Q33AA_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AA) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AA) <- c("%")
Q33AA_tab <- xtable(Q33AA)
digits(Q33AA_tab) <- 1
align(Q33AA_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AA_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33B**: Please indicate the extent to which you agree/disagree with the following statements: In general, senior military leaders, like generals and admirals, are demographically representative of the American people.

```{r echo = FALSE}
Q33AB <- matrix(svymean(~Q33AB_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AB) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AB) <- c("%")
Q33AB_tab <- xtable(Q33AB)
digits(Q33AB_tab) <- 1
align(Q33AB_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AB_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33C**: Please indicate the extent to which you agree/disagree with the following statements: I would be proud if a member of my family or a close friend joined the U.S. military.

```{r echo = FALSE}
Q33AC <- matrix(svymean(~Q33AC_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AC) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AC) <- c("%")
Q33AC_tab <- xtable(Q33AC)
digits(Q33AC_tab) <- 1
align(Q33AC_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AC_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**2 - Q33D**: Please indicate the extent to which you agree/disagree with the following statements: In general, people who join the U.S. military are more patriotic than people who do not join.

```{r echo = FALSE}
Q33AD <- matrix(svymean(~Q33AD_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AD) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AD) <- c("%")
Q33AD_tab <- xtable(Q33AD)
digits(Q33AD_tab) <- 1
align(Q33AD_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AD_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33E**: Please indicate the extent to which you agree/disagree with the following statements: The military has more problems with sexual harrassment and assault than civilian society.

```{r echo = FALSE}
Q33AE <- matrix(svymean(~Q33AE_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AE) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AE) <- c("%")
Q33AE_tab <- xtable(Q33AE)
digits(Q33AE_tab) <- 1
align(Q33AE_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AE_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33F**: Please indicate the extent to which you agree/disagree with the following statements: The military gets more respect than it deserves from civilian society.

```{r echo = FALSE}
Q33AF <- matrix(svymean(~Q33AF_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AF) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AF) <- c("%")
Q33AF_tab <- xtable(Q33AF)
digits(Q33AF_tab) <- 1
align(Q33AF_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AF_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33G**: Please indicate the extent to which you agree/disagree with the following statements: The United States government should cut spending on domestic entitlement programs like Medicare and Social Security in order to increase spending on the defense budget.

```{r echo = FALSE}
Q33AG <- matrix(svymean(~Q33AG_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AG) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AG) <- c("%")
Q33AG_tab <- xtable(Q33AG)
digits(Q33AG_tab) <- 1
align(Q33AG_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AG_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**2 - Q33H**: Please indicate the extent to which you agree/disagree with the following statements: All Americans should stand for the national anthem because it shows respect for our military.

```{r echo = FALSE}
Q33AH <- matrix(svymean(~Q33AH_r2_fac, milconf_design, na.rm = TRUE) * 100)
rownames(Q33AH) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
colnames(Q33AH) <- c("%")
Q33AH_tab <- xtable(Q33AH)
digits(Q33AH_tab) <- 1
align(Q33AH_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q33AH_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\break

**Q41A**: Do you agree or disagree with the following statement? I have quite a lot of confidence in the U.S. military.

```{r echo = FALSE}
Q41A <- matrix(NA, nrow = 2, ncol = 1)
Q41A[1,1] <- svymean(~Q41A_a_fac, milconf_design, na.rm = TRUE)[1] * 100
Q41A[2,1] <- svymean(~Q41A_a_fac, milconf_design, na.rm = TRUE)[2] * 100
rownames(Q41A) <- c("Agree", "Disagree")
colnames(Q41A) <- c("%")
Q41A_tab <- xtable(Q41A)
digits(Q41A_tab) <- 1
align(Q41A_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q41A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q41B**: According to recent polls, the U.S. military is by far the most respected institution in America today. An overwhelming majority of Americans believe it is their patriotic duty to "support the troops." Do you agree or disagree with the following statement? I have quite a lot of confidence in the U.S. military.

```{r echo = FALSE}
Q41B <- matrix(NA, nrow = 2, ncol = 1)
Q41B[1,1] <- svymean(~Q41B_a_fac, milconf_design, na.rm = TRUE)[1] * 100
Q41B[2,1] <- svymean(~Q41B_a_fac, milconf_design, na.rm = TRUE)[2] * 100
rownames(Q41B) <- c("Agree", "Disagree")
colnames(Q41B) <- c("%")
Q41B_tab <- xtable(Q41B)
digits(Q41B_tab) <- 1
align(Q41B_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q41B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q41C**: According to recent polls, confidence in the U.S. military decreased by ten points between 2009 and 2017. Fewer Americans now believe it is their patriotic duty to "support the troops." Do you agree or disagree with the following statement? I have quite a lot of confidence in the U.S. military. 

```{r echo = FALSE}
Q41C <- matrix(NA, nrow = 2, ncol = 1)
Q41C[1,1] <- svymean(~Q41C_a_fac, milconf_design, na.rm = TRUE)[1] * 100
Q41C[2,1] <- svymean(~Q41C_a_fac, milconf_design, na.rm = TRUE)[2] * 100
rownames(Q41C) <- c("Agree", "Disagree")
colnames(Q41C) <- c("%")
Q41C_tab <- xtable(Q41C)
digits(Q41C_tab) <- 1
align(Q41C_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q41C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q41D**: Please tell us how many of the statements listed below you agree with. We don't want to know which ones, just how many. For example, if you agree with three items on the list, you would answer ``3". Remember, we won't know which answers you agree with, just how many.

\begin{itemize}
  \item I have quite a lot of confidence that the earth is flat.
  \item I believe global warming is a left-wing conspiracy.
  \item I believe immigration is good for the economy.
  \item I have quite a lot of confidence in my local Department of Motor Vehicles (DMV).
  \item I believe abortion should be illegal except for cases of rape or incest.
\end{itemize}

```{r echo = FALSE}
Q41D <- matrix(NA, nrow = 6, ncol = 1)
Q41D[1,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[1] * 100
Q41D[2,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[2] * 100
Q41D[3,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[3] * 100
Q41D[4,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[4] * 100
Q41D[5,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[5] * 100
Q41D[6,1] <- svymean(~Q41D_fac, milconf_design, na.rm = TRUE)[6] * 100
rownames(Q41D) <- c("1", "2", "3", "4", "5", "6")
colnames(Q41D) <- c("%")
Q41D_tab <- xtable(Q41D)
digits(Q41D_tab) <- 1
align(Q41D_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q41D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q41E**: Please tell us how many of the statements listed below you agree with. We don't want to know which ones, just how many. For example, if you agree with three items on the list, you would answer ``3". Remember, we won't know which answers you agree with, just how many.

\begin{itemize}
  \item I have quite a lot of confidence that the earth is flat.
  \item I believe global warming is a left-wing conspiracy.
  \item I believe immigration is good for the economy.
  \item I have quite a lot of confidence in my local Department of Motor Vehicles (DMV).
  \item I believe abortion should be illegal except for cases of rape or incest.
  \item I have quite a lot of confidence in the U.S. military.
\end{itemize}

```{r echo = FALSE}
Q41E <- matrix(NA, nrow = 7, ncol = 1)
Q41E[1,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[1] * 100
Q41E[2,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[2] * 100
Q41E[3,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[3] * 100
Q41E[4,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[4] * 100
Q41E[5,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[5] * 100
Q41E[6,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[6] * 100
Q41E[7,1] <- svymean(~Q41E_fac, milconf_design, na.rm = TRUE)[7] * 100
rownames(Q41E) <- c("1", "2", "3", "4", "5", "6", "7")
colnames(Q41E) <- c("%")
Q41E_tab <- xtable(Q41E)
digits(Q41E_tab) <- 1
align(Q41E_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q41E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

```{r echo = FALSE}
Q41 <- matrix(NA, nrow = 4, ncol = 5)
Q41[1,1] <- svyby(~Q41D, ~DOV_ASSIGNMENT_A+dem, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[2,1] <- svyby(~Q41D, ~DOV_ASSIGNMENT_A+ind, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[3,1] <- svyby(~Q41D, ~DOV_ASSIGNMENT_A+rep, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[4,1] <- svyby(~Q41D, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1,2]
Q41[1,2] <- svyby(~Q41E, ~DOV_ASSIGNMENT_A+dem, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[2,2] <- svyby(~Q41E, ~DOV_ASSIGNMENT_A+ind, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[3,2] <- svyby(~Q41E, ~DOV_ASSIGNMENT_A+rep, milconf_design, svymean, na.rm = TRUE)[9,3]
Q41[4,2] <- svyby(~Q41E, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1,2]
Q41[,3] <- (Q41[,2] - Q41[,1]) * 100
Q41[1,4] <- svyby(~Q41A_a, ~DOV_ASSIGNMENT_A+dem, milconf_design, svymean, na.rm = TRUE)[9,3] * 100
Q41[2,4] <- svyby(~Q41A_a, ~DOV_ASSIGNMENT_A+ind, milconf_design, svymean, na.rm = TRUE)[9,3] * 100
Q41[3,4] <- svyby(~Q41A_a, ~DOV_ASSIGNMENT_A+rep, milconf_design, svymean, na.rm = TRUE)[9,3] * 100
Q41[4,4] <- svyby(~Q41A_a, ~DOV_ASSIGNMENT_A, milconf_design, svymean, na.rm = TRUE)[1,2] * 100
Q41[,5] <- Q41[,4] - Q41[,3]
rownames(Q41) <- c("Democrat", "Independent", "Republican", "Overall")
colnames(Q41) <- c("Control", "Treatment", "True (%)", "Direct (%)", "Effect (%)")
Q41_tab <- xtable(Q41)
digits(Q41_tab) <- c(0,2,2,0,0,0)
align(Q41_tab) <- "rccccc"
```

```{r echo = FALSE, results = "asis"}
print(Q41_tab, comment = FALSE)
```

\hfill

**Q42A**: Please indicate to what extent you agree/disagree with these statements: I approve of President Trump's declaration of a national emergency along the U.S.-Mexico border.

```{r echo = FALSE}
Q42A <- matrix(NA, nrow = 6, ncol = 5)
Q42A[,1] <- svyby(~Q42A_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42A[,2] <- svyby(~Q42A_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42A[,3] <- svyby(~Q42A_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42A[,4] <- svyby(~Q42A_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42A[,5] <- svyby(~Q42A_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42A) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42A) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42A_tab <- xtable(Q42A)
digits(Q42A_tab) <- 1
align(Q42A_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42A_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42B**: Please indicate to what extent you agree/disagree with these statements: The Central American migrants approaching the southern border pose a serious threat to U.S. national security.

```{r echo = FALSE}
Q42B <- matrix(NA, nrow = 6, ncol = 5)
Q42B[,1] <- svyby(~Q42B_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42B[,2] <- svyby(~Q42B_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42B[,3] <- svyby(~Q42B_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42B[,4] <- svyby(~Q42B_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42B[,5] <- svyby(~Q42B_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42B) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42B) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42B_tab <- xtable(Q42B)
digits(Q42B_tab) <- 1
align(Q42B_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42B_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42C**: Please indicate to what extent you agree/disagree with these statements: The military has become too partisan.

```{r echo = FALSE}
Q42C <- matrix(NA, nrow = 6, ncol = 5)
Q42C[,1] <- svyby(~Q42C_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42C[,2] <- svyby(~Q42C_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42C[,3] <- svyby(~Q42C_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42C[,4] <- svyby(~Q42C_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42C[,5] <- svyby(~Q42C_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42C) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42C) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42C_tab <- xtable(Q42C)
digits(Q42C_tab) <- 1
align(Q42C_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42C_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42D**: Please indicate to what extent you agree/disagree with these statements: The military is good at what it does.

```{r echo = FALSE}
Q42D <- matrix(NA, nrow = 6, ncol = 5)
Q42D[,1] <- svyby(~Q42D_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42D[,2] <- svyby(~Q42D_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42D[,3] <- svyby(~Q42D_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42D[,4] <- svyby(~Q42D_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42D[,5] <- svyby(~Q42D_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42D) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42D) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42D_tab <- xtable(Q42D)
digits(Q42D_tab) <- 1
align(Q42D_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42D_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42E**: Please indicate to what extent you agree/disagree with these statements: The military makes truthful claims.

```{r echo = FALSE}
Q42E <- matrix(NA, nrow = 6, ncol = 5)
Q42E[,1] <- svyby(~Q42E_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42E[,2] <- svyby(~Q42E_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42E[,3] <- svyby(~Q42E_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42E[,4] <- svyby(~Q42E_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42E[,5] <- svyby(~Q42E_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42E) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42E) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42E_tab <- xtable(Q42E)
digits(Q42E_tab) <- 1
align(Q42E_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42E_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42F**: Please indicate to what extent you agree/disagree with these statements: I trust the military.

```{r echo = FALSE}
Q42F <- matrix(NA, nrow = 6, ncol = 5)
Q42F[,1] <- svyby(~Q42F_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42F[,2] <- svyby(~Q42F_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42F[,3] <- svyby(~Q42F_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42F[,4] <- svyby(~Q42F_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42F[,5] <- svyby(~Q42F_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42F) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42F) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42F_tab <- xtable(Q42F)
digits(Q42F_tab) <- 1
align(Q42F_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42F_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q42G**: Please indicate to what extent you agree/disagree with these statements: The military shares my values.

```{r echo = FALSE}
Q42G <- matrix(NA, nrow = 6, ncol = 5)
Q42G[,1] <- svyby(~Q42G_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,6] * 100
Q42G[,2] <- svyby(~Q42G_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,5] * 100
Q42G[,3] <- svyby(~Q42G_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,4] * 100
Q42G[,4] <- svyby(~Q42G_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,3] * 100
Q42G[,5] <- svyby(~Q42G_r2_fac, ~DOV_ASSIGNMENT_C, milconf_design, svymean, na.rm = TRUE)[,2] * 100
rownames(Q42G) <- c("Control", "National Emergency", "Troops Quoted", "Democratic Leader", "Military Agree", "Military Disagree")
colnames(Q42G) <- c("Strongly Agree", "Agree", "Neither", "Disagree", "Strongly Disagree")
Q42G_tab <- xtable(Q42G)
digits(Q42G_tab) <- 1
align(Q42G_tab) <- "rccccc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q42G_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q44**: Have you socialized or worked with someone in the military or their spouse in the last 30 days?

```{r echo = FALSE}
Q44 <- matrix(svymean(~Q44_fac, milconf_design, na.rm = TRUE) * 100, nrow = 4, ncol = 1)
rownames(Q44) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q44) <- c("%")
Q44_tab <- xtable(Q44)
digits(Q44_tab) <- 1
align(Q44_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q44_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q45**: Have you socialized or worked with someone in the military or their spouse in the last year?

```{r echo = FALSE}
Q45 <- matrix(svymean(~Q45_fac, milconf_design, na.rm = TRUE) * 100, nrow = 4, ncol = 1)
rownames(Q45) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q45) <- c("%")
Q45_tab <- xtable(Q45)
digits(Q45_tab) <- 1
align(Q45_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q45_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q46**: Has a member of your immediate family (parent, spouse, sibling, child, or grandparent) served, or do they currently serve, in the military?

```{r echo = FALSE}
Q46 <- matrix(svymean(~Q46_fac, milconf_design, na.rm = TRUE) * 100, nrow = 4, ncol = 1)
rownames(Q46) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q46) <- c("%")
Q46_tab <- xtable(Q46)
digits(Q46_tab) <- 1
align(Q46_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q46_tab, comment = FALSE, floating = FALSE)
```
\end{center}

\hfill

**Q47**: Would you advise a close friend or relative or the child of a close friend or relative to join the military?

```{r echo = FALSE}
Q47 <- matrix(svymean(~Q47_fac, milconf_design, na.rm = TRUE) * 100, nrow = 4, ncol = 1)
rownames(Q47) <- c("Yes", "No", "Don't Know", "Skipped")
colnames(Q47) <- c("%")
Q47_tab <- xtable(Q47)
digits(Q47_tab) <- 1
align(Q47_tab) <- "rc"
```

\begin{center}
```{r echo = FALSE, results = "asis"}
print(Q47_tab, comment = FALSE, floating = FALSE)
```
\end{center}